package com.cqut.service;

import java.util.List;
import java.util.Map;

import com.cqut.dto.LimitShowDTO;
import com.cqut.dto.RoleDTO;
import com.cqut.dto.RoleRigthDTO;
import com.cqut.model.Role;
import com.cqut.model.RoleRigth;

public interface IRoleService {
    boolean save(Role role);

    boolean update(Role role);

    boolean delete(String roleId);

    boolean batchDelete(String[] primaryKeys);

    Role findModel(String roleId);

    Role findModel(String roleId, String[] parameters);

    Map<String, Object> findMap(String roleId);

    Map<String, Object> findMap(String roleId, String[][] parameters);

    List<Role> loadModels();

    List<Role> loadModels(String condition, Object[] values, String order, String sort, int curPage, int limit);

    List<Role> loadModels(String[] parameters, String condition, Object[] values, String order, String sort, int curPage, int limit);

    List<Map<String, Object>> loadMaps();

    List<Map<String, Object>> loadMaps(String condition, Object[] values, String order, String sort, int curPage, int limit);

    List<Map<String, Object>> loadMaps(String[][] parameters, String condition, Object[] values, String order, String sort, int curPage, int limit);

    long count();

    long count(String condition, Object[] values);

    long count(String[] parameters, boolean isDistinct);

    long count(String[] parameters, String condition, Object[] values, boolean isDistinct);

	long findCountOfRoles(String roleName);

	boolean addOperator(String name, String password, String sex, String state,String type, String phone, String email, String college);

	boolean deleteRoleByIds(String[] roleIds);

	boolean addRoleAndRolePermission(RoleDTO roleDTO, RoleRigthDTO roleRigthDTO, int maxRoleRightId);

	List<Map<String, Object>> findRolesWithLimit(String roleName, LimitShowDTO limitShowDTO);

	boolean upadateRoleAndRolePermission(RoleDTO roleDTO, RoleRigthDTO roleRigthDTO, int maxRoleRightId);
	
	
}
